/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package tools.experimentsDataDealing;

import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;

/**
 *
 * @author Administrator
 */
public class test {

    Double data[] = {
        1.051997762, 0.618349829, 0.907448451, 0.040152586, 0.618349829, 0.473800519, -1.694439143, 0.907448451, -1.694439143, 0.473800519, -1.694439143, 0.618349829, -1.694439143, 0.040152586, -0.538044657, 0.329251208, 0.618349829, 0.618349829,
        0.257333498, 1.045759536, 0.257333498, -2.699264142, 1.144312791, -0.728199049, 1.045759536, 0.750099772, -1.220965322, 0.257333498, -0.728199049, 0.257333498, -0.235432775, 0.750099772, 1.045759536, 0.257333498, -0.728199049, -0.728199049,
        -0.091248761, 0.495350418, 1.668548775, -2.437645477, 1.081949597, -0.67784794, 1.081949597, 1.55122894, -0.091248761, -0.67784794, -0.091248761, -0.091248761, -0.67784794, -0.67784794, 0.495350418, 0.495350418, -0.67784794, -0.67784794,
        0.46388285, 0.690782071, 0.690782071, 0.01008441, 0.690782071, 0.23698363, -0.21681481, 0.736161915, 0.23698363, 0.23698363, -2.485807013, -0.21681481, -2.712706234, -0.21681481, 0.46388285, 0.690782071, 0.46388285, 0.23698363,
        0.192792127, 0.886843783, 0.192792127, -2.583414497, 1.442085107, -1.195311185, 0.192792127, 1.025654114, -1.889362841, 0.192792127, 0.192792127, 0.192792127, 0.192792127, -0.501259529, 0.886843783, 0.192792127, 0.192792127, 0.192792127,
        0.294627825, 0.294627825, 0.824957911, -0.23570226, 0.559792868, 0.824957911, -2.88735269, 0.824957911, 0.559792868, 0.294627825, -1.031197389, 0.559792868, -1.296362432, -0.766032346, -0.766032346, 0.294627825, 0.824957911, 0.824957911,
        0.867406759, 0.56830098, 0.56830098, -0.628122136, 0.56830098, -0.329016357, 1.046870226, 0.927227914, -0.628122136, 0.269195201, -2.422756808, 0.269195201, -2.422756808, 0.269195201, 0.269195201, 0.56830098, 0.269195201, -0.029910578,
        -0.123205532, 0.52905905, 0.52905905, -2.732263861, 1.181323632, -0.775470114, 1.572682381, 1.703135298, -0.123205532, -0.775470114, -0.123205532, -0.123205532, -0.123205532, -0.123205532, -0.123205532, 0.52905905, -0.123205532, -0.775470114,
        0.137562662, 0.789175269, 0.789175269, -1.81727516, 0.789175269, 0.789175269, -0.514049946, 1.571110397, 0.137562662, -0.514049946, -1.81727516, 0.137562662, -1.81727516, -0.514049946, 0.137562662, 0.789175269, 0.789175269, 0.137562662,
        0.614056178, 0.614056178, 0.614056178, -1.30820664, 0.614056178, 0.614056178, -0.827640935, 0.614056178, -0.347075231, 0.614056178, -2.269338048, 0.133490473, -2.269338048, 0.614056178, 0.614056178, 0.133490473, 0.614056178, 0.614056178,
        -1.261207071, 0.315301768, 0.315301768, -2.837715909, -0.472952651, -0.472952651, 0.315301768, 1.734159722, -1.261207071, 0.315301768, 1.103556187, 0.315301768, 0.315301768, 0.315301768, 0.315301768, 0.315301768, 0.315301768, 0.315301768,
        -0.358937706, 1.10944382, 0.375253057, -2.561509996, 1.69679643, -0.358937706, 0.375253057, 1.10944382, -1.09312847, 0.375253057, -1.09312847, 0.375253057, -1.09312847, -0.358937706, 0.375253057, 0.375253057, 0.375253057, 0.375253057,
        -0.39807516, 1.19422548, 0.39807516, -2.78652612, 1.19422548, -1.19422548, 0.39807516, 0.716535288, -1.19422548, 0.39807516, 0.39807516, 0.39807516, 0.39807516, 0.39807516, 0.39807516, 0.39807516, 0.079615032, -1.19422548,
        -1.123124754, 0.242837785, 0.242837785, -2.489087294, 0.925819054, -1.123124754, 1.335607816, 1.47220407, -0.440143485, -0.440143485, 0.242837785, -0.440143485, 0.242837785, 1.335607816, 0.652626547, 0.242837785, -0.440143485, -0.440143485,
        -0.920668271, 1.10031086, 0.42665115, -2.267987691, 1.10031086, -0.920668271, 1.10031086, 0.696115034, -0.920668271, -0.920668271, 0.42665115, -0.24700856, 0.42665115, 0.42665115, 1.504506686, 0.42665115, -0.516472445, -0.920668271,
        -0.403389989, 0.369058926, 0.369058926, -2.720736734, 0.369058926, -1.175838904, 0.369058926, 1.141507841, -1.175838904, 0.369058926, 0.369058926, 0.369058926, 0.369058926, 0.369058926, 1.60497719, 0.369058926, 0.214569143, -1.175838904,
        -0.21496369, 0.337800084, 0.337800084, -1.87325501, 0.890563857, -1.87325501, 1.222222121, 1.332774876, -1.320491237, 0.337800084, -0.21496369, -0.767727463, -0.21496369, 1.222222121, 0.890563857, 0.337800084, 0.337800084, -0.767727463,
        -0.086534167, 1.471080843, -0.086534167, -3.007062311, -0.086534167, -0.086534167, -0.086534167, 1.276378967, -1.060043548, -0.086534167, -0.086534167, -0.086534167, -0.086534167, 1.471080843, -0.086534167, -0.086534167, -0.086534167, 0.886975214
    };

    public test() {
        
    }
    public static void main(String[] args) {
        //首先保留1位有效数字
        test te=new test();
        int[]  b=new int[te.data.length];
        for (int i = 0; i < te.data.length; i++) {
            b[i]=(int)(te.data[i]*10);
        }
        float[] c=new float[te.data.length];
        for (int i = 0; i < c.length; i++) {
            c[i]=b[i]/10.0f;
        }
        //去掉重复数字
        Set<Float> floatData=new HashSet<>();
        for (int i = 0; i < c.length; i++) {
            floatData.add(c[i]);
        }
        List<Float> d=new LinkedList<>();
        d.addAll(floatData);
        //排序
        java.util.Collections.sort(d);
        for (int i = 0; i < d.size(); i++) {
            System.out.print(d.get(i)+"\t");
        }
    }

}
